//
//
//  连接参数设置界面
//
//


import QtQuick
import QtQuick.Controls.Material

Item {
    id: connectSettingWindowRoot
    width: rootWidth
    height: rootHeight /*- 150*/

    Rectangle{
        anchors.horizontalCenter: connectSettingWindowRoot.horizontalCenter
        anchors.top: connectSettingWindowRoot.top
        anchors.topMargin: 10
        color: "transparent"
        border.width: 1
        width: 1060
        height: 600

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 20
            anchors.top: parent.top
            anchors.topMargin: 20
            font.pixelSize: 30
            text: qsTr("PLC连接属性 : ")
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 80
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("端口号 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 80
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 5
            validatorFlag : false
            showData: Cpp_Config.plc_Port

            onInputFinished: {
                Cpp_Config.plc_Port = inputData
                console.log("PLC 端口号: " + inputData )
            }

        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 165
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("波特率 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 165
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 7
            validatorFlag : false
            showData: Cpp_Config.plc_BaudRate


            onInputFinished: {
                Cpp_Config.plc_BaudRate = inputData
                console.log("PLC 数据位: " + inputData )
            }

        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 245
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("数据位 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 245
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 1
            validatorFlag : false
            showData: Cpp_Config.plc_DataBit

            onInputFinished: {
                Cpp_Config.plc_DataBit = inputData
                console.log("PLC 数据位: " + inputData )
            }

        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 325
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("校验位 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 325
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 4
            validatorFlag : false
            showData: Cpp_Config.plc_Parity

            onInputFinished: {
                Cpp_Config.plc_Parity = inputData
                console.log("PLC 校验位: " + inputData )
            }

        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 405
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("停止位 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 405
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 3
            validatorFlag : false
            showData: Cpp_Config.plc_Stopbit

            onInputFinished: {
                Cpp_Config.plc_Stopbit = inputData
                console.log("PLC 停止位: " + inputData )
            }

        }



    }

    Rectangle{
        anchors.horizontalCenter: connectSettingWindowRoot.horizontalCenter
        anchors.top: connectSettingWindowRoot.top
        anchors.topMargin: 630
        color: "transparent"
        border.width: 1
        width: 1060
        height: 600


        Text{
            anchors.left: parent.left
            anchors.leftMargin: 20
            anchors.top: parent.top
            anchors.topMargin: 20
            font.pixelSize: 30
            text: qsTr("打印机连接属性 : ")
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 80
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("端口号 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 80
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 5
            validatorFlag : false

            showData: Cpp_Config.printer_Port

            onInputFinished: {
                Cpp_Config.printer_Port = inputData
                console.log("打印机 端口号: " + inputData )
            }
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 165
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("波特率 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 165
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 7
            validatorFlag : false

            showData: Cpp_Config.printer_BaudRate

            onInputFinished: {
                Cpp_Config.printer_BaudRate = inputData
                console.log("打印机 数据位: " + inputData )
            }
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 245
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("数据位 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 245
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 1
            validatorFlag : false

            showData: Cpp_Config.printer_DataBit

            onInputFinished: {
                Cpp_Config.printer_DataBit = inputData
                console.log("打印机 数据位: " + inputData )
            }
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 325
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("校验位 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 325
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 4
            validatorFlag : false

            showData: Cpp_Config.printer_Parity

            onInputFinished: {
                Cpp_Config.printer_Parity = inputData
                console.log("打印机 校验位: " + inputData )
            }
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 405
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("停止位 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 405
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 3
            validatorFlag : false

            showData: Cpp_Config.printer_Stopbit

            onInputFinished: {
                Cpp_Config.printer_Stopbit = inputData
                console.log("打印机 停止位: " + inputData )
            }
        }



    }


    Rectangle{
        anchors.horizontalCenter: connectSettingWindowRoot.horizontalCenter
        anchors.top: connectSettingWindowRoot.top
        anchors.topMargin: 1250
        color: "transparent"
        border.width: 1
        width: 1060
        height: 600


        Text{
            anchors.left: parent.left
            anchors.leftMargin: 20
            anchors.top: parent.top
            anchors.topMargin: 20
            font.pixelSize: 30
            text: qsTr("扫码枪连接属性 : ")
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 80
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("端口号 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 80
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 5
            validatorFlag : false

            showData: Cpp_Config.scanner_Port

            onInputFinished: {
                Cpp_Config.scanner_Port = inputData
                console.log("扫码枪 端口号: " + inputData )
            }
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 165
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("波特率 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 165
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 7
            validatorFlag : false

            showData: Cpp_Config.scanner_BaudRate

            onInputFinished: {
                Cpp_Config.scanner_BaudRate = inputData
                console.log("扫码枪 波特率: " + inputData )
            }
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 245
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("数据位 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 245
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 1
            validatorFlag : false

            showData: Cpp_Config.scanner_DataBit

            onInputFinished: {
                Cpp_Config.scanner_DataBit = inputData
                console.log("扫码枪 数据位: " + inputData )
            }
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 325
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("校验位 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 325
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 4
            validatorFlag : false

            showData: Cpp_Config.scanner_Parity

            onInputFinished: {
                Cpp_Config.scanner_Parity = inputData
                console.log("扫码枪 校验位: " + inputData )
            }
        }

        A_Label{
            anchors.left: parent.left
            anchors.leftMargin: 300
            anchors.top: parent.top
            anchors.topMargin: 405
            labelBack: "transparent"
            labelBorderColor: "transparent"
            label_Data: qsTr("停止位 : ")
            labelWidth: 200
            labelHeight: 60

        }

        A_TextInput{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.top: parent.top
            anchors.topMargin: 405
            inputWidth: 300
            inputHeight: 60
            borderWidth: 2
            maxDataLength: 3
            validatorFlag : false

            showData: Cpp_Config.scanner_Stopbit

            onInputFinished: {
                Cpp_Config.scanner_Stopbit = inputData
                console.log("扫码枪 停止位: " + inputData )
            }
        }

    }


    Component.onCompleted: {
        console.log("生成！！ - 连接参数设置")
    }

    Component.onDestruction: {
        console.log("销毁 - 连接参数设置")
    }

}
